package com.cndw.kungfu.dao;

import com.cndw.dao.jade.annotation.DAO;
import com.cndw.dao.jade.annotation.SQL;
import com.cndw.dao.jade.annotation.SQLParam;

@DAO
public interface LogRegDao {

	public static final String TABLE = " kf_log_reg ";
	
	public static final String FIELDS = " id,accountName,timeFirst,state";
	
	@SQL("INSERT INTO "+TABLE+" ("+FIELDS+") VALUES(0,:acc,:time,1)")
	public void insert(@SQLParam("acc") String accountName,@SQLParam("time") int timeFirst);
	
	
	@SQL("update "+TABLE+" set state =:state where  accountName=:acc order by id desc limit 1 ")
	public void update(@SQLParam("acc") String accountName,@SQLParam("state") int state);
	
	
}
